import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import router from './router/router';
import 'reflect-metadata';

import Vue3TouchEvents, {
  type Vue3TouchEventsOptions,
} from "vue3-touch-events";

import mitt from "mitt";
const emitter = mitt();

// 引入vant样式
import 'vant/lib/index.css';
import 'amfe-flexible'
import 'vant/es/notify/style'
import 'vant/es/toast/style'
 import VConsole from 'vconsole';
 //new VConsole();
const app = createApp(App);
app.use(createPinia()).use(router).use<Vue3TouchEventsOptions>(Vue3TouchEvents, {
  disableClick: false
  // any other global options...
});
declare module "vue" {
  export interface ComponentCustomProperties {
    $bus: typeof emitter;
  }
}

app.config.globalProperties.$bus = emitter;

app.mount('#app');
